import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/style/toutiao-icon.css'
import 'amfe-flexible'
import Vant from 'vant'
import 'vant/lib/index.css'
import '@/style/index.less'
import day from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import 'dayjs/locale/zh-cn'
Vue.use(Vant)

day.locale('zh-cn')
day.extend(relativeTime)

Vue.filter('relativeTime', function(val) {
  // return day(val).format('YYYY-MM-DD')
  return day().to(val)
})
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
